///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 21 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "ControlLab.h"

#include "icons/player_pause.xpm"
#include "icons/player_play.xpm"
#include "icons/player_record.xpm"
#include "icons/player_stop.xpm"

// Using the construction of a static object to ensure that the help provider is set
class wxFBContextSensitiveHelpSetter
{
public:
wxFBContextSensitiveHelpSetter()
{
wxHelpProvider::Set( new wxHelpControllerHelpProvider );
}
};

static wxFBContextSensitiveHelpSetter s_wxFBSetTheHelpProvider;
///////////////////////////////////////////////////////////////////////////

ControlLabFrame::ControlLabFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizerMain;
	bSizerMain = new wxBoxSizer( wxVERTICAL );
	
	m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
	m_panel_display = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizerDisplay;
	bSizerDisplay = new wxBoxSizer( wxHORIZONTAL );
	
	m_toolBar = new wxToolBar( m_panel_display, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_VERTICAL ); 
	m_toolBar->AddTool( wxID_ANY, wxT("Play"), wxBitmap( player_play_xpm ), wxNullBitmap, wxITEM_CHECK, wxEmptyString, wxEmptyString );
	m_toolBar->AddTool( wxID_ANY, wxT("Record"), wxBitmap( player_record_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
	m_toolBar->AddTool( wxID_ANY, wxT("Pause"), wxBitmap( player_pause_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
	m_toolBar->AddTool( wxID_ANY, wxT("Stop"), wxBitmap( player_stop_xpm ), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString );
	m_toolBar->Realize();
	
	bSizerDisplay->Add( m_toolBar, 0, wxEXPAND, 5 );
	
	m_scrolledWindowDisplay = new wxScrolledWindow( m_panel_display, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
	m_scrolledWindowDisplay->SetScrollRate( 5, 5 );
	bSizerDisplay->Add( m_scrolledWindowDisplay, 1, wxEXPAND | wxALL, 5 );
	
	m_panel_display->SetSizer( bSizerDisplay );
	m_panel_display->Layout();
	bSizerDisplay->Fit( m_panel_display );
	m_notebook->AddPage( m_panel_display, wxT("Display"), true );
	m_panel_design = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizerDesign;
	bSizerDesign = new wxBoxSizer( wxHORIZONTAL );
	
	m_treeCtrlDesign = new wxTreeCtrl( m_panel_design, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxALWAYS_SHOW_SB );
	m_treeCtrlDesign->SetMinSize( wxSize( 150,-1 ) );
	
	bSizerDesign->Add( m_treeCtrlDesign, 0, wxALL|wxEXPAND, 5 );
	
	m_scrolledWindowDesign = new wxScrolledWindow( m_panel_design, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
	m_scrolledWindowDesign->SetScrollRate( 5, 5 );
	bSizerDesign->Add( m_scrolledWindowDesign, 1, wxEXPAND | wxALL, 5 );
	
	m_panel_design->SetSizer( bSizerDesign );
	m_panel_design->Layout();
	bSizerDesign->Fit( m_panel_design );
	m_notebook->AddPage( m_panel_design, wxT("Design"), false );
	
	bSizerMain->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
	
	this->SetSizer( bSizerMain );
	this->Layout();
	m_statusBar = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
	m_menubar = new wxMenuBar( 0 );
	file = new wxMenu();
	wxMenuItem* newProject;
	newProject = new wxMenuItem( file, ID_NEW, wxString( wxT("New") ) , wxEmptyString, wxITEM_NORMAL );
	file->Append( newProject );
	
	wxMenuItem* open;
	open = new wxMenuItem( file, ID_OPEN, wxString( wxT("Open") ) , wxEmptyString, wxITEM_NORMAL );
	file->Append( open );
	
	wxMenuItem* save;
	save = new wxMenuItem( file, ID_SAVE, wxString( wxT("Save") ) , wxEmptyString, wxITEM_NORMAL );
	file->Append( save );
	
	wxMenuItem* saveAs;
	saveAs = new wxMenuItem( file, ID_SAVE_AS, wxString( wxT("Save As...") ) , wxEmptyString, wxITEM_NORMAL );
	file->Append( saveAs );
	
	wxMenuItem* exit;
	exit = new wxMenuItem( file, ID_EXIT, wxString( wxT("Exit") ) , wxEmptyString, wxITEM_NORMAL );
	file->Append( exit );
	
	m_menubar->Append( file, wxT("File") );
	
	edit = new wxMenu();
	wxMenuItem* copy;
	copy = new wxMenuItem( edit, ID_COPY, wxString( wxT("Copy") ) , wxEmptyString, wxITEM_NORMAL );
	edit->Append( copy );
	
	wxMenuItem* cut;
	cut = new wxMenuItem( edit, ID_CUT, wxString( wxT("Cut") ) , wxEmptyString, wxITEM_NORMAL );
	edit->Append( cut );
	
	wxMenuItem* paste;
	paste = new wxMenuItem( edit, ID_PASTE, wxString( wxT("Paste") ) , wxEmptyString, wxITEM_NORMAL );
	edit->Append( paste );
	
	wxMenuItem* deleteObject;
	deleteObject = new wxMenuItem( edit, ID_DELETE, wxString( wxT("Delete") ) , wxEmptyString, wxITEM_NORMAL );
	edit->Append( deleteObject );
	
	m_menubar->Append( edit, wxT("Edit") );
	
	view = new wxMenu();
	m_menubar->Append( view, wxT("View") );
	
	tools = new wxMenu();
	m_menubar->Append( tools, wxT("Tools") );
	
	help = new wxMenu();
	wxMenuItem* documentation;
	documentation = new wxMenuItem( help, ID_DOCUMENTATION, wxString( wxT("Documentation") ) , wxEmptyString, wxITEM_NORMAL );
	help->Append( documentation );
	
	wxMenuItem* about;
	about = new wxMenuItem( help, ID_ABOUT, wxString( wxT("About") ) , wxEmptyString, wxITEM_NORMAL );
	help->Append( about );
	
	m_menubar->Append( help, wxT("Help") );
	
	this->SetMenuBar( m_menubar );
	
	
	// Connect Events
	this->Connect( newProject->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ControlLabFrame::onNewProjectSelected ) );
	this->Connect( exit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ControlLabFrame::onExitClicked ) );
	this->Connect( about->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ControlLabFrame::onAboutClicked ) );
}

ControlLabFrame::~ControlLabFrame()
{
	// Disconnect Events
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ControlLabFrame::onNewProjectSelected ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ControlLabFrame::onExitClicked ) );
	this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ControlLabFrame::onAboutClicked ) );
}

AboutDialog::AboutDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer5;
	bSizer5 = new wxBoxSizer( wxVERTICAL );
	
	m_staticTextProjectName = new wxStaticText( this, wxID_ANY, wxT("Control Lab"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
	m_staticTextProjectName->Wrap( -1 );
	m_staticTextProjectName->SetFont( wxFont( 24, 70, 90, 92, false, wxEmptyString ) );
	
	bSizer5->Add( m_staticTextProjectName, 0, wxALIGN_CENTER|wxALL, 5 );
	
	m_staticTextVersion = new wxStaticText( this, wxID_ANY, wxT("Version 0.1"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
	m_staticTextVersion->Wrap( -1 );
	m_staticTextVersion->SetFont( wxFont( 16, 70, 90, 90, false, wxEmptyString ) );
	
	bSizer5->Add( m_staticTextVersion, 0, wxALIGN_CENTER|wxALL, 5 );
	
	m_staticTextAuthor = new wxStaticText( this, wxID_ANY, wxT("Author: Greg D. Garber"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
	m_staticTextAuthor->Wrap( -1 );
	bSizer5->Add( m_staticTextAuthor, 0, wxALIGN_CENTER|wxALL, 5 );
	
	m_htmlWinAbout = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
	bSizer5->Add( m_htmlWinAbout, 1, wxALL|wxEXPAND, 5 );
	
	m_button_close = new wxButton( this, wxID_ANY, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
	m_button_close->SetToolTip( wxT("close this dialog") );
	
	bSizer5->Add( m_button_close, 0, wxALL, 5 );
	
	this->SetSizer( bSizer5 );
	this->Layout();
	
	// Connect Events
	m_button_close->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDialog::closeAboutDlg ), NULL, this );
}

AboutDialog::~AboutDialog()
{
	// Disconnect Events
	m_button_close->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDialog::closeAboutDlg ), NULL, this );
}
